package pl.edu.agh.sr.lab3.zad2.impl.server;

import org.omg.CORBA.IntHolder;
import org.omg.CORBA.ShortHolder;

import pl.edu.agh.sr.lab3.zad2.generated.ItemCPOA;

public class ItemCImpl extends ItemCPOA {

	private String name;

	public ItemCImpl(String name) {
		this.name = name;
	}

	@Override
	public void actionC(IntHolder a, ShortHolder b) {
		System.out.println("In ItemCImpl::actionC()");
		a.value = b.value;
		b.value %= 2;
	}

	@Override
	public String name() {
		return name;
	}

	@Override
	public int get_item_age() {
		return name.length();
	}
}
